package cn.adviceclient.features.module.impl.render;

import cn.adviceclient.features.module.Category;
import cn.adviceclient.features.module.Module;
import cn.adviceclient.features.value.AbstractSetting;
import cn.adviceclient.features.value.BooleanSetting;
import cn.adviceclient.features.value.ColorSetting;
import cn.adviceclient.features.value.slider.FloatSetting;
import cn.adviceclient.features.value.slider.NumberSetting;
import net.minecraft.entity.player.EntityPlayer;

import java.awt.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ESP2D extends Module {
    public final BooleanSetting tags = new BooleanSetting("Tags", "tags", true);
    private final BooleanSetting fontTags = new BooleanSetting("Font Tags", "font tags", true);
    public final BooleanSetting fonttagsBackground = new BooleanSetting("Font Tags Background", "font background", true, fontTags::get);
    public final BooleanSetting fonttagsHealth = new BooleanSetting("Font Tags Health", "Font Tags Health", true, fontTags::get);
    public final FloatSetting tagsSize = new FloatSetting("Tags Size", "tag size", 0.5f, 0.1f, 2f, 0.05f, tags::get);
    public final BooleanSetting tagsHealth = new BooleanSetting("Tags Health", "tag health", true, tags::get);
    public final BooleanSetting tagsBackground = new BooleanSetting("Tags Background", "tags background", true, tags::get);
    public final BooleanSetting tagsHealthBar = new BooleanSetting("Tags Health Bar", "tag health bar", true, tags::get);
    public final BooleanSetting item = new BooleanSetting("Item", "item", true, tags::get);
    public final BooleanSetting esp2d = new BooleanSetting("2D ESP", "2D ESP", true);
    public final BooleanSetting box = new BooleanSetting("Box", "box", true, esp2d::get);
    public final BooleanSetting boxSyncColor = new BooleanSetting("Box Sync Color", "box sync color", false, () -> esp2d.get() && box.get());
    public final ColorSetting boxColor = new ColorSetting("Box Color", "box color",Color.RED, () -> esp2d.get() && box.get() && !boxSyncColor.get());
    public final BooleanSetting healthBar = new BooleanSetting("Health Bar", "health bar",true,  esp2d::get);
    public final BooleanSetting healthBarSyncColor = new BooleanSetting("Health Bar Sync Color", "health bar sync color",false,  () -> esp2d.get() && healthBar.get());
    public final ColorSetting absorptionColor = new ColorSetting("Absorption Color", "absorption color",new Color(255, 255, 50), () -> esp2d.get() && healthBar.get() && !healthBarSyncColor.get());
    public final BooleanSetting armorBar = new BooleanSetting("Armor Bar", "armor bar",true, esp2d::get);
    public final ColorSetting armorBarColor = new ColorSetting("Armor Bar Color", "armor bar color",new Color(50, 255, 255), () -> esp2d.get() && armorBar.get());
    public final Map<EntityPlayer, float[][]> playerRotationMap = new HashMap<>();
    private final Map<EntityPlayer, float[]> entityPosMap = new HashMap<>();

    public ESP2D() {
        super("ESP2D", "2DESP & Nametags", Category.RENDER);
    }

}
